<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
	<link rel="stylesheet" href="lib/bootstrap-3.3.7.css">
	<script type="text/javascript" src="lib/vue-2.4.0.js"></script>
	<script type="text/javascript" src="lib/vue-router.min.js"></script>
	<style>
	*,h1 {
		margin: 0;
		padding: 0;
	}

	.header{
		height: 50px;
		background-color: pink;
	}
	.contarin{
		display: flex;
		height: 400px;
	}
	.left {
		flex: 2;
		background-color: green;
	}
	.main {
		flex: 8;
		background-color: lawngreen;
	}

	</style>
</head>
<body>
	<div id="app">
		<router-view ></router-view>
		<div class="contarin">
			<router-view name="left"></router-view>
			<router-view name="right"></router-view>
		</div>
	</div>
	<script>
	var header = {
		template: '<h1 class="header">头部</h1>'
	}
	var left = {
		template: '<h1 class="left">侧边栏</h1>'
	}
	var main = {
		template: '<h1 class="main">右边主要内容</h1>'
	}
	var router = new VueRouter({
		routes: [
			{
				path: '/',
				components: {
					default: header,
					left: left,
					right: main
				}
			}
		]
	});
	var vm = new Vue({
		el: '#app',
		data: {},
		methods: {},
		router
	});
	</script>
</body>
</html>